<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <link rel="stylesheet" href="../static/css/bootstrap.css" >
    <link rel="stylesheet" href="../static/css/style-index.css">

    <title>个人中心</title>
    <script src="../static/js/jquery-3.6.0.js"></script>
    <script>
        var username = null;
        $.ajax({
            async: false,
            type: 'GET',
            url: "loginuser",
            success: function (r){
                username = r;
            }
        }), $.ajax({
            type: 'POST',
            url: "finduserbyname",
            data: {"name": username},
            success: function (r){

                // var m="<tr>r.name</tr><tr>r.sex</tr><tr>r.address</tr><tr>r.password</tr>";
                var m = "";

                $.each(r, function(i,n) {
                    console.log(n);
                    m+= "<p>"+n+"</p>";
                    // m+= "<tr>"+n["name"]+"</tr>" +
                    //     "<tr>"+n["sex"]+"</tr>"+
                    //     "<tr>"+n["address"]+"</tr>" +
                    //     "<tr>"+n["password"]+"</tr>" +
                    //     "<tr>"+n["birthday"]+"</tr>";

                });
                m += "";
                console.log(m);
                // $("#loginuser").append(m);
                $(".loginuser").show().append(m);
            }
        })
    </script>
</head>
<body>
<nav class="navbar navbar-dark col-lg-12 bg-dark ">
    <div class="toggle float-left" onclick="toggleMenu()">
        <img src="../static/img/menu.jpg" width="36" height="36">
    </div>
    <div class="col-lg-1 " >
        <a class="navbar-brand float-left" href="#">我执为您服务</a>
    </div>

    <div class="navbar-brand col-lg-10 text-center ">
        <span >Talk is cheap,show me your code</span>
    </div>
</nav>
<div  class="navigation ">
    <ul>
        <li >
            <a  href = "resume">
                <span class="icon"><i class="fa fa-comment" aria-hidden="true"></i></span>
                <span class="title">我的简历</span>
            </a>
        </li>
        <li>
            <a href = "main" >
                <span class="icon"><i class="fa fa-home" aria-hidden="true" ></i></span>
                <span class="title" >会议室预约</span>
            </a>
        </li>
        <li >
            <a href = "usercenter">
                <span class="icon"><i class="fa fa-user" aria-hidden="true"></i></span>
                <span class="title">用户中心</span>
            </a>
        </li>
    </ul>
</div>

<div class="container text-center card-body">
    <form name="" method="post" class="">
        <div>
            <img src="../static/img/wozhi.jpg"  width="72" height="72" >

        </div>
<!--        <ul class="loginuser">-->
<!--            <li></li>-->
<!--            <li></li>-->
<!--            <li></li>-->
<!--            <li></li>-->
<!--            <li></li>-->
<!--            <li>密码</li>-->

<!--        </ul>-->
<!--        <ul class="loginuser">-->
<!--            <li class="loginuser"></li>-->
<!--        </ul>-->

<!--        <table class="loginuser" style="writing-mode:tb-lr">-->

<!--                <p>id</p>-->
<!--                <p>用户名</p>-->
<!--                <p>地址</p>-->
<!--                <p>性别</p>-->
<!--                <p>生日</p>-->
<!--                <p>密码</p>-->


<!--        </table>-->
        <table class="table  table-striped text-center">
            <tr>
                <td>
                    <p>id</p>
                    <p>用户名</p>
                    <p>地址</p>
                    <p>性别</p>
                    <p>生日</p>
                    <p>密码</p>
                </td>
                <td class="loginuser">

                </td>
            </tr>
        </table>
        <button id=""   class="btn  btn-dark "  >
            <a class="text-light" >修改信息</a>
        </button>
    </form>
</div>



<script type="text/javascript">
    function toggleMenu(){
        let navigation = document.querySelector('.navigation');
        let toggle = document.querySelector('.toggle');
        navigation.classList.toggle('active');
        toggle.classList.toggle('active');
    }
</script>
</body>
</html>